package com.shihb.behavioralpatterns.mementopattern;

import java.util.HashMap;
import java.util.Map;

/**
 *Description:
 *Version:1.0.0
 *@author shihb
 *@date 2020/7/31 21:18
 */
public class Caretaker {
  private Map<String,Memento> map=new HashMap<>();
  void addMemento(String name,Memento memento){
    map.put(name,memento);
  }
  Memento getMemento(String name){
    return map.get(name);
  }

}
